<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui">

<h:head>
	<title>Sistema de Rastreamento</title>
	<h:outputStylesheet name="style.css" library="css" />
	<ui:insert name="userscript" />
</h:head>

<h:body>

	<div id="header">
		<div class="center" align="center">
			<div id="logo" align="center">
				<a href="#"></a>
			</div>
		</div>
	</div>

	<div id="menubar">
		<h:form rendered="#{usuarioBean.logado}">

			<p:growl id="messages" />

			<p:menubar>
			
				<p:submenu label="Administrar" icon="ui-icon-gear">
					<p:submenu label="Categorias">
						<p:menuitem value="Incluir"   icon="ui-icon-pencil" ajax="false"  url="cadastra-categoria.xhtml" />
						<p:menuitem value="Consultar" icon="ui-icon-search"  url="listar-categoria.xhtml" update="messages" />
					</p:submenu>
					<p:submenu label="Documentos">
						<p:menuitem value="Incluir"   icon="ui-icon-pencil" ajax="false"  action="#{documentoManagedBean.abrirPaginaCadastro}" />
						<p:menuitem value="Consultar" icon="ui-icon-search"   url="listar-documento.xhtml" update="messages" />
					</p:submenu>
					<p:submenu label="Tipos de Documentos">
						<p:menuitem value="Incluir"   icon="ui-icon-pencil"   ajax="false" url="cadastra-tipo-documento.xhtml" />
						<p:menuitem value="Consultar" icon="ui-icon-search"   url="listar-tipo-documento.xhtml" />
					</p:submenu>
					<p:submenu label="Usuarios">
						<p:menuitem value="Incluir"   icon="ui-icon-pencil"  ajax="false"  action="#{usuarioBean.abrirPaginaCadastro}" />
						<p:menuitem value="Consultar" icon="ui-icon-search"   url="listar-usuario.xhtml" update="messages" />
					</p:submenu>
				</p:submenu>

				<p:menuitem value="Matriz" icon="ui-icon-document" ajax="false" action="#{matrizBean.abrirPaginaCadastro}"  />

				<p:submenu label="Help" icon="ui-icon-help">
					<p:menuitem value="Contents" url="#" />
					<p:submenu label="Search" icon="ui-icon-search">
						<p:submenu label="Text">
							<p:menuitem value="Workspace" url="#" />
						</p:submenu>
						<p:menuitem value="File" url="#" />
					</p:submenu>
				</p:submenu>

				<p:menuitem value="Quit" url="http://www.primefaces.org" icon="ui-icon-close" />
			</p:menubar>

		</h:form>
	</div>	

	<div id="center" class="textbox2">
		<ui:insert name="content" />
	</div>

	<div id="footer">
		<div class="foot">
			<span>Copyright 2012. Todos os Direitos reservados</span>
		</div>
	</div>

</h:body>
</html>